package com.bdqn.Practice.service;

import com.bdqn.Practice.mapper.SupplierMapper;
import com.bdqn.Practice.pojo.Supplier;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("supplierService")
public class SupplierServiceImpl implements SupplierService{
    @Autowired
    private SupplierMapper supplierMapper;
    @Override
    public List<Supplier> selectPageList(Integer pageNo, Integer pageSize, String querySupCode, String querySupName) {
        return supplierMapper.selectPageList((pageNo-1)*pageSize,pageSize,querySupCode,querySupName);
    }

    @Override
    public Supplier supplierView(int supId) {
        return supplierMapper.supplierView(supId);
    }

    @Override
    public int count() {
        return supplierMapper.count();
    }

    @Override
    public List<Supplier> selectSupName() {
        return supplierMapper.selectSupName();
    }

    @Override
    public int add(Supplier supplier) {
        return supplierMapper.add(supplier);
    }
}
